﻿package Message.Public
{
    import Framework.MQ.*;
    import Framework.Serialize.*;

    public class SAutoArenaFightInfo extends IMessageBase
    {
        public var fromChannelId:int;
        public var fromRank:int;
        public var toRank:int;
        public var fromFightRole:SFightRole;
        public var toFightRole:SFightRole;
        public const _type:int = 7028;
        public static var _regist:SAutoArenaFightInfo = new SAutoArenaFightInfo(true);

        public function SAutoArenaFightInfo(param1:Boolean = false)
        {
            if (param1)
            {
                MessageManager.instance().regist(this);
            }
            return;
        }// end function

        override public function getType() : int
        {
            return this._type;
        }// end function

        override public function clone() : IMessageBase
        {
            return new SAutoArenaFightInfo();
        }// end function

        override public function __write(param1:SerializeStream) : void
        {
            param1.writeInt(this.fromChannelId);
            param1.writeInt(this.fromRank);
            param1.writeInt(this.toRank);
            this.fromFightRole.__write(param1);
            this.toFightRole.__write(param1);
            return;
        }// end function

        override public function __read(param1:SerializeStream) : void
        {
            this.fromChannelId = param1.readInt();
            this.fromRank = param1.readInt();
            this.toRank = param1.readInt();
            this.fromFightRole = new SFightRole();
            this.fromFightRole.__read(param1);
            this.toFightRole = new SFightRole();
            this.toFightRole.__read(param1);
            return;
        }// end function

    }
}
